#pragma once
#include "CMediaBase.h"

class CImageSource;

class CImageBrushReportCallback;

class CImageBase :
	public CMediaBase
{
protected: 
	CImageBase(CCoreServices * pCore);
protected: 
	virtual ~CImageBase();
public: 
	XBOOL HasNinegrid() const;
	struct XRECTF_RB GetNinegrid() const;
	virtual HRESULT InvokeImpl(CDependencyProperty * pdp, CDependencyObject * pNamescopeOwner);
	virtual XBOOL HasValidMediaSource();
	virtual HRESULT EnsureBrush();
	virtual HRESULT FireImageFailed(XBOOL iErrorCode);
	HRESULT FireDownloadProgress(XFLOAT idownloadProgress);
	virtual HRESULT FireImageOpened();
	virtual HRESULT HasProtectedContent(XBOOL * pfHasProtectedContent);
protected: 
	virtual void CloseMedia();
	virtual HRESULT GetNaturalBounds(struct XRECTF_WH & pNaturalBounds);
	virtual struct Xcp_IAutomationPeer * OnCreateAutomationPeerImpl();
	HRESULT UpdateMeasure();
	CImageBrushReportCallback * m_pImageReportCallback;
public: 
	XFLOAT m_downloadProgress;
	CImageSource * m_pImageSource;
	struct XRECTF_RB m_ninegridPrivate;
};

